﻿using System;
using System.Text.RegularExpressions;
namespace LabaCS3
{

    public class MyException : Exception
    {
        public MyException(string reason) : base(reason) { }
        // public MyException(String reason, Exception inner): base(reason, inner) { }
    }

    //печатное издание
    public abstract class PrintEdition : DeclEdition
    {

        private string title;
        private string author;
        private double cost;
        public Content content;
        public abstract void NameClass();

        public PrintEdition()
        {

        }

        public PrintEdition(string title, string author, double cost)
        {
            this.title = title;
            this.author = author;
            this.cost = cost;
            content = new Indexer();

        }

        public PrintEdition(string title, string author, double cost, Content content)
        {
            this.title = title;
            this.author = author;
            this.cost = cost;
            this.content = content;

        }

        public string Title
        {
            get
            {
                return title;
            }
            set
            {
                title = value;
            }


        }

        public string AuthorName
        {
            get
            {
                return author;
            }
            set
            {
                author = value;

            }

        }
        public double Cost
        {
            get
            {
                return cost;

            }

            set
            {
                //if (cost < 0)
                //    throw (new ArgumentException("стоимость не может быть отрицательной"));
                cost = value;

            }

        }



    }
}